Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed detail command issue #47 #48

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

prasoona14
Copy link

Hi, this is Prasoona Ganaparthi, a student at George Mason University. While exploring open-source projects, I came across yours and found it incredibly interesting. I noticed an issue that was posted on GitHub and decided to work on it. After setting up the environment on my system, I worked on resolving the issue and would love your feedback on my approach.

This pull request fixes the issue where the detail command doesn't automatically start the server if not already. With this update, the server will automatically start if it is not running when executing any detail subcommand (workflow, process, host, or get_process_code).

Code Changes:

  1. Added ensure_server_running Function:
    Ensures the Geoweaver server is running before executing a detail command.
    Starts the server based on the user's operating system (Windows, macOS, or Linux).
    Includes parameters for forced server restart or forced jar download (force_restart and force_download).

  2. Integrated ensure_server_running Across detail Subcommands:
    detail_workflow, detail_process, detail_host, and get_process_code now call ensure_server_running before proceeding
    with their logic.

Testing Results:
Tested the changes in the local environment on macOS. Below are some test commands and their outputs:

Stop server and list processes:
gw stop
gw list process
Output: Successfully stopped Geoweaver and listed processes without issues.

Start server automatically via detail command:
gw detail code z56pry
Output: Successfully started Geoweaver server and displayed the process details.

Get host details via detail command:
gw detail host 100001
Output: Server started automatically, and host details were retrieved successfully.

Request for Testing:
Please test the following scenarios:

  1. Execute detail commands without the server running to verify it starts automatically.
  2. Test with force_restart=True and force_download=True to ensure proper server reinitialization.
  3. Confirm compatibility across Windows, macOS, and Linux.

Looking forward to contribute more this project.

Copy link
Collaborator

@saikiranAnnam saikiranAnnam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good, and it is not breaking anything. The approach for starting the server with the detail command looks good.

@saikiranAnnam saikiranAnnam merged commit b761c00 into ESIPFed:main Dec 13, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants